package com.dotflat.survey.controller;

import com.dotflat.rest.controller.RestfulBaseController;
import com.dotflat.survey.domain.SurveySheetItem;
import com.dotflat.survey.po.SurveySheetItemPO;
import com.dotflat.survey.service.SurveySheetItemService;

import com.matt.commons.model.StatusResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.matt.foundation.constant.RequestConstant.TICKET;


@RestController
@RequestMapping("/v2/survey/sheet_item")
@Slf4j
@Api(tags = "问卷 - 条目")
public class SurveySheetItemController extends RestfulBaseController<SurveySheetItem, SurveySheetItemService, SurveySheetItemPO> {

    @Autowired
    public void setBaseService(SurveySheetItemService service){
        super.setBaseService(service);
    }

    @Override
    @ApiOperation(value = "获取一个对象", response = SurveySheetItem.class)
    @GetMapping()
    public StatusResponse get(@RequestHeader(TICKET) String ticket, String id){
        return super.get(ticket, id);
    }
}
